﻿    <local:DocumentBase x:Class="WPFExcelReport.OrderNetwork"
           xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
          xmlns:local="clr-namespace:ReflectionStudio.Components.UserControls;assembly=ReflectionStudio.Core"
                xmlns:fd="clr-namespace:Labs.Filtering;assembly=ReflectionStudio.Core"
        xmlns:wep="clr-namespace:WPFExcelReport"
       Height="700" Width="1024" 
          
         Loaded="Window_Loaded"
        Title="OrderNetwork"  
     >
    <local:DocumentBase.Resources>
    </local:DocumentBase.Resources>
    <Grid DataContext="{Binding}">
        <Grid.RowDefinitions>
            <RowDefinition Height="100" />
            <RowDefinition Height="153*" />
            <RowDefinition Height="338*" />
            <RowDefinition Height="70*" />
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="100*"></ColumnDefinition>
            <ColumnDefinition Width="100*"></ColumnDefinition>
        </Grid.ColumnDefinitions>
        <StackPanel Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" Orientation="Horizontal">
            <Button Content="生成报表" Height="40" Margin="60,10,0,0"  Name="btnQuery" Width="90" Click="btnQuery_Click"/>
            <TextBlock FontSize="18"  Height="40"   Width="80" Name="txtVKPAUFKRS" Margin="30,10,0,0" Text="生产单" />
            <TextBlock  FontSize="18" Height="40"    Width="160" Name="txtVKPAUFLFD"   Margin="30,10,0,0"    Text="" />
            <TextBlock  FontSize="18" Height="40"    Width="120" Name="txtVKPAUFPOS"  Margin="30,10,0,0"  Text="" />
        </StackPanel>
        <fd:FilteringDataGrid  Grid.Row="1" CanUserReorderColumns="True"  
          CanUserResizeRows="True" CanUserSortColumns="True" IsFilteringCaseSensitive="False" AutoGenerateColumns="False"   
         EnableRowVirtualization="True"  RowDetailsVisibilityMode="VisibleWhenSelected" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" IsSynchronizedWithCurrentItem="True" Opacity="10" Visibility="Visible"
         ItemsSource="{Binding Path=VKPOS}" x:Name="VKPOSDataGrid"  
         SelectionChanged="MainDataGrid_SelectionChanged" Grid.ColumnSpan="2">
            <fd:FilteringDataGrid.Columns>
                <DataGridTextColumn Header="客户" Binding="{Binding KDKUNDNA}"/>
                <DataGridTextColumn Header="生" Binding="{Binding Path=VKPAUFKRS}"/>
                <DataGridTextColumn Header="产" Binding="{Binding VKPAUFLFD}"/>
                <DataGridTextColumn Header="单" Binding="{Binding VKPAUFPOS}"/>
                <DataGridTextColumn Header="单类" Binding="{Binding VKPPOSTYP}"/>
                <DataGridTextColumn Header="系列" Binding="{Binding VKPKOLL}"/>
                <DataGridTextColumn Header="品种" Binding="{Binding VKPART}"/>
                <DataGridTextColumn Header="色号" Binding="{Binding VKPFARBE}"/>
                <DataGridTextColumn Header="对浆缸号" Binding="{Binding VKPKDARTNR}"/>
                <DataGridTextColumn Header="开单数量" Binding="{Binding OPENQTY}"/>
                <DataGridTextColumn Header="计划数量" Binding="{Binding PLANQTY}"/>
                <DataGridTextColumn Header="单位" Binding="{Binding VKPMEEH}"/>
                <DataGridTextColumn Header="开单日期" Binding="{Binding VKPNEUDAT}"/>
                <DataGridTextColumn Header="需求日期" Binding="{Binding VKPNEUDAT}"/>
                <DataGridTextColumn Header="交期" Binding="{Binding VKPLIEFEING}"/>
                <DataGridTextColumn Header="客户PO" Binding="{Binding VKPKDKOMM}"/>
            </fd:FilteringDataGrid.Columns>
        </fd:FilteringDataGrid  >
        <fd:FilteringDataGrid  Grid.Row="2" IsFilteringCaseSensitive="False"
            AutoGenerateColumns="False" HorizontalAlignment="Stretch"
                               Width="Auto" VerticalAlignment="Stretch"
                               ItemsSource="{Binding Path=ABAUFM}" 
                               Margin="0,1,0,15" 
                               x:Name="listOrderNetwork">
            <fd:FilteringDataGrid.Columns>
                <DataGridTextColumn Header="单类" Binding="{Binding ABPAUFART}"/>
                <DataGridTextColumn Header="生" Binding="{Binding ABAAUFKRS}"/>
                <DataGridTextColumn Header="产" Binding="{Binding ABAAUFLFD}"/>
                <DataGridTextColumn Header="单" Binding="{Binding ABAAUFPOS}"/>
                <DataGridTextColumn Header="预留给" Binding="{Binding ORDERNO}"/>
                <DataGridTextColumn Header="个数" Binding="{Binding ABASANZSTK}"/>
                <DataGridTextColumn Header="单数" Binding="{Binding QTY}"/>
            </fd:FilteringDataGrid.Columns>
        </fd:FilteringDataGrid  >
    </Grid>
</local:DocumentBase>
